package cn.gov.pbc.dream.dao;

import cn.gov.pbc.dream.pojo.repository.DistrictDo;
import cn.gov.pbc.dream.pojo.repository.ProvinceDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DistrictDoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(DistrictDo record);

    int insertSelective(DistrictDo record);

    DistrictDo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DistrictDo record);

    int updateByPrimaryKey(DistrictDo record);

    DistrictDo selectByCodeAndCityId(@Param("code") String code,
                                     @Param("cityId") Integer cityId);

    List<DistrictDo> selectByCityId(Integer cityId);

    List<DistrictDo> searchAllAreaByParam(
            @Param("searchWord") String searchWord,
            @Param("showNoName") Boolean showNoName,
            @Param("provinceId") Integer provinceId,
            @Param("cityId") Integer cityId,
            @Param("districtId") Integer districtId
    );
}